// OUTDOOR SECTION SCRIPT
//    Section: X = 0, Y = 1

// This is the special encounter script for this town.
// The states INIT_STATE and START_STATE have
// meanings that are described in the documenation. States you write
// yourself should be numbered from 10-100.

beginoutdoorscript;

variables;

short i,j,k,r1,choice;

body;

beginstate 0;
// This state called whenever this section is loaded into memory.
	set_state_continue(14);
break;

beginstate START_STATE;
// This state is called every turn the party is in this outdoor section. 
break;

beginstate 10;
	if (get_flag(201,0) == 250)
		end();
	reset_dialog();
	add_dialog_str(0,"There is movement ahead. Swamp-hunters on the prowl. The sickly greenery of the fen suddenly seems less the threat as the monstrous beings ahead tear apart everything in their way.",0);
	add_dialog_choice(0,"OK.");
	add_dialog_choice(1,"Attack.");
	choice = run_dialog(1);
	if (choice == 1)
		message_dialog("You carefully move out of the way of the beasts as they rage by.","");
	if (choice == 2){
		create_out_spec_enc(0);
		set_flag(201,0,250);
		}
break;

beginstate 14;
	if (get_flag(201,0) == 250)
	set_terrain(7,24,0);
break;